3.825 \(\int \frac{(A+B \cos (c+d x)) \sec ^2(c+d x)}{\sqrt{b \cos (c+d x)}} \, dx\)

Optimal. Leaf size=135 \[ \frac{2 A b \sin (c+d x)}{3 d (b \cos (c+d x))^{3/2}}+\frac{2 A \sqrt{\cos (c+d x)} F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{3 d \sqrt{b \cos (c+d x)}}+\frac{2 B \sin (c+d x)}{d \sqrt{b \cos (c+d x)}}-\frac{2 B E\left (\left .\frac{1}{2} (c+d x)\right |2\right ) \sqrt{b \cos (c+d x)}}{b d \sqrt{\cos (c+d x)}} \]

[Out]

(-2*B*Sqrt[b*Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2])/(b*d*Sqrt[Cos[c + d*x]]) + (2*A*Sqrt[Cos[c + d*x]]*Ellip
ticF[(c + d*x)/2, 2])/(3*d*Sqrt[b*Cos[c + d*x]]) + (2*A*b*Sin[c + d*x])/(3*d*(b*Cos[c + d*x])^(3/2)) + (2*B*Si
n[c + d*x])/(d*Sqrt[b*Cos[c + d*x]])

________________________________________________________________________________________

Rubi [A]  time = 0.130198, antiderivative size = 135, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.226, Rules used = {16, 2748, 2636, 2642, 2641, 2640, 2639} \[ \frac{2 A b \sin (c+d x)}{3 d (b \cos (c+d x))^{3/2}}+\frac{2 A \sqrt{\cos (c+d x)} F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{3 d \sqrt{b \cos (c+d x)}}+\frac{2 B \sin (c+d x)}{d \sqrt{b \cos (c+d x)}}-\frac{2 B E\left (\left .\frac{1}{2} (c+d x)\right |2\right ) \sqrt{b \cos (c+d x)}}{b d \sqrt{\cos (c+d x)}} \]

Antiderivative was successfully verified.

[In]

Int[((A + B*Cos[c + d*x])*Sec[c + d*x]^2)/Sqrt[b*Cos[c + d*x]],x]

[Out]

(-2*B*Sqrt[b*Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2])/(b*d*Sqrt[Cos[c + d*x]]) + (2*A*Sqrt[Cos[c + d*x]]*Ellip
ticF[(c + d*x)/2, 2])/(3*d*Sqrt[b*Cos[c + d*x]]) + (2*A*b*Sin[c + d*x])/(3*d*(b*Cos[c + d*x])^(3/2)) + (2*B*Si
n[c + d*x])/(d*Sqrt[b*Cos[c + d*x]])

Rule 16

Int[(u_.)*(v_)^(m_.)*((b_)*(v_))^(n_), x_Symbol] :> Dist[1/b^m, Int[u*(b*v)^(m + n), x], x] /; FreeQ[{b, n}, x
] && IntegerQ[m]

Rule 2748

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c, Int[(b*S
in[e + f*x])^m, x], x] + Dist[d/b, Int[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]

Rule 2636

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(Cos[c + d*x]*(b*Sin[c + d*x])^(n + 1))/(b*d*(n +
1)), x] + Dist[(n + 2)/(b^2*(n + 1)), Int[(b*Sin[c + d*x])^(n + 2), x], x] /; FreeQ[{b, c, d}, x] && LtQ[n, -1
] && IntegerQ[2*n]

Rule 2642

Int[1/Sqrt[(b_)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[Sqrt[Sin[c + d*x]]/Sqrt[b*Sin[c + d*x]], Int[1/Sqr
t[Sin[c + d*x]], x], x] /; FreeQ[{b, c, d}, x]

Rule 2641

Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2*EllipticF[(1*(c - Pi/2 + d*x))/2, 2])/d, x] /; FreeQ
[{c, d}, x]

Rule 2640

Int[Sqrt[(b_)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[Sqrt[b*Sin[c + d*x]]/Sqrt[Sin[c + d*x]], Int[Sqrt[Si
n[c + d*x]], x], x] /; FreeQ[{b, c, d}, x]

Rule 2639

Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2*EllipticE[(1*(c - Pi/2 + d*x))/2, 2])/d, x] /; FreeQ[{
c, d}, x]

Rubi steps

\begin{align*} \int \frac{(A+B \cos (c+d x)) \sec ^2(c+d x)}{\sqrt{b \cos (c+d x)}} \, dx &=b^2 \int \frac{A+B \cos (c+d x)}{(b \cos (c+d x))^{5/2}} \, dx\\ &=\left (A b^2\right ) \int \frac{1}{(b \cos (c+d x))^{5/2}} \, dx+(b B) \int \frac{1}{(b \cos (c+d x))^{3/2}} \, dx\\ &=\frac{2 A b \sin (c+d x)}{3 d (b \cos (c+d x))^{3/2}}+\frac{2 B \sin (c+d x)}{d \sqrt{b \cos (c+d x)}}+\frac{1}{3} A \int \frac{1}{\sqrt{b \cos (c+d x)}} \, dx-\frac{B \int \sqrt{b \cos (c+d x)} \, dx}{b}\\ &=\frac{2 A b \sin (c+d x)}{3 d (b \cos (c+d x))^{3/2}}+\frac{2 B \sin (c+d x)}{d \sqrt{b \cos (c+d x)}}+\frac{\left (A \sqrt{\cos (c+d x)}\right ) \int \frac{1}{\sqrt{\cos (c+d x)}} \, dx}{3 \sqrt{b \cos (c+d x)}}-\frac{\left (B \sqrt{b \cos (c+d x)}\right ) \int \sqrt{\cos (c+d x)} \, dx}{b \sqrt{\cos (c+d x)}}\\ &=-\frac{2 B \sqrt{b \cos (c+d x)} E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{b d \sqrt{\cos (c+d x)}}+\frac{2 A \sqrt{\cos (c+d x)} F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{3 d \sqrt{b \cos (c+d x)}}+\frac{2 A b \sin (c+d x)}{3 d (b \cos (c+d x))^{3/2}}+\frac{2 B \sin (c+d x)}{d \sqrt{b \cos (c+d x)}}\\ \end{align*}

Mathematica [A]  time = 0.146592, size = 84, normalized size = 0.62 \[ \frac{2 \left (A \tan (c+d x)+A \sqrt{\cos (c+d x)} F\left (\left .\frac{1}{2} (c+d x)\right |2\right )+3 B \sin (c+d x)-3 B \sqrt{\cos (c+d x)} E\left (\left .\frac{1}{2} (c+d x)\right |2\right )\right )}{3 d \sqrt{b \cos (c+d x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[((A + B*Cos[c + d*x])*Sec[c + d*x]^2)/Sqrt[b*Cos[c + d*x]],x]

[Out]

(2*(-3*B*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2] + A*Sqrt[Cos[c + d*x]]*EllipticF[(c + d*x)/2, 2] + 3*B*S
in[c + d*x] + A*Tan[c + d*x]))/(3*d*Sqrt[b*Cos[c + d*x]])

________________________________________________________________________________________

Maple [B]  time = 6.625, size = 405, normalized size = 3. \begin{align*}{\frac{2}{3\,bd}\sqrt{b \left ( 2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1 \right ) \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}} \left ( 2\,A{\it EllipticF} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) \sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1} \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+6\,B{\it EllipticE} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) \sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1} \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-12\,B\cos \left ( 1/2\,dx+c/2 \right ) \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{4}-A\sqrt{ \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticF} \left ( \cos \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) ,\sqrt{2} \right ) +2\,A\cos \left ( 1/2\,dx+c/2 \right ) \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-3\,B\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticE} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) +6\,B \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}\cos \left ( 1/2\,dx+c/2 \right ) \right ) \sqrt{-2\,b \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{4}+ \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}b} \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-3} \left ( 4\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{4}-4\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+1 \right ) ^{-1}{\frac{1}{\sqrt{b \left ( 2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1 \right ) }}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*cos(d*x+c))*sec(d*x+c)^2/(b*cos(d*x+c))^(1/2),x)

[Out]

2/3*(b*(2*cos(1/2*d*x+1/2*c)^2-1)*sin(1/2*d*x+1/2*c)^2)^(1/2)/b/sin(1/2*d*x+1/2*c)^3/(4*sin(1/2*d*x+1/2*c)^4-4
*sin(1/2*d*x+1/2*c)^2+1)*(2*A*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*
x+1/2*c)^2-1)^(1/2)*sin(1/2*d*x+1/2*c)^2+6*B*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))*(sin(1/2*d*x+1/2*c)^2)^(1/2
)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*sin(1/2*d*x+1/2*c)^2-12*B*cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^4-A*(sin(1/
2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))+2*A*cos(1/2*d*x+1
/2*c)*sin(1/2*d*x+1/2*c)^2-3*B*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticE(cos(1/2
*d*x+1/2*c),2^(1/2))+6*B*sin(1/2*d*x+1/2*c)^2*cos(1/2*d*x+1/2*c))*(-2*b*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c
)^2*b)^(1/2)/(b*(2*cos(1/2*d*x+1/2*c)^2-1))^(1/2)/d

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \cos \left (d x + c\right ) + A\right )} \sec \left (d x + c\right )^{2}}{\sqrt{b \cos \left (d x + c\right )}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cos(d*x+c))*sec(d*x+c)^2/(b*cos(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

integrate((B*cos(d*x + c) + A)*sec(d*x + c)^2/sqrt(b*cos(d*x + c)), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left (B \cos \left (d x + c\right ) + A\right )} \sqrt{b \cos \left (d x + c\right )} \sec \left (d x + c\right )^{2}}{b \cos \left (d x + c\right )}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cos(d*x+c))*sec(d*x+c)^2/(b*cos(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

integral((B*cos(d*x + c) + A)*sqrt(b*cos(d*x + c))*sec(d*x + c)^2/(b*cos(d*x + c)), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cos(d*x+c))*sec(d*x+c)**2/(b*cos(d*x+c))**(1/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \cos \left (d x + c\right ) + A\right )} \sec \left (d x + c\right )^{2}}{\sqrt{b \cos \left (d x + c\right )}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*cos(d*x+c))*sec(d*x+c)^2/(b*cos(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate((B*cos(d*x + c) + A)*sec(d*x + c)^2/sqrt(b*cos(d*x + c)), x)